package com.shuda.business.monitor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shuda.business.monitor.entity.DataMonitorEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 数据监控Mapper接口
 */
@Mapper
public interface DataMonitorMapper extends BaseMapper<DataMonitorEntity> {

    /**
     * 获取监控统计信息
     */
    Map<String, Object> getMonitorStatistics(@Param("startTime") LocalDateTime startTime, 
                                             @Param("endTime") LocalDateTime endTime);

    /**
     * 获取渠道分布统计
     */
    List<Map<String, Object>> getChannelDistributionStatistics(@Param("startTime") LocalDateTime startTime, 
                                                             @Param("endTime") LocalDateTime endTime);

    /**
     * 获取处理成功率
     */
    Map<String, Object> getProcessingSuccessRate(@Param("startTime") LocalDateTime startTime, 
                                               @Param("endTime") LocalDateTime endTime);

    /**
     * 获取异常统计
     */
    Map<String, Object> getExceptionStatistics(@Param("startTime") LocalDateTime startTime, 
                                             @Param("endTime") LocalDateTime endTime);

    /**
     * 获取性能监控数据
     */
    Map<String, Object> getPerformanceMonitorData(@Param("startTime") LocalDateTime startTime, 
                                                @Param("endTime") LocalDateTime endTime);

    /**
     * 获取数据质量报告
     */
    Map<String, Object> getDataQualityReport(@Param("startTime") LocalDateTime startTime, 
                                           @Param("endTime") LocalDateTime endTime);
}